<template>
	<view class="content">
		<view class="list">
			<view class="card" v-for="(item,index) in list" :key="index"> <!-- @click="tabAct(item.id)" -->
				<view class="pic">
					<img :src="item.avatar" alt="">
				</view>
				<view class="name">{{item.checkTitle}}</view>
				<view class="other">
					<view class="name">创建时间：{{item.startTime}} </view>
					<!-- <view class="btn">点击参与</view> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navId: 0,
				list: [],
			}
		},
		onShow() {
			this.getlist(0)
		},
		onLoad() {

		},
		methods: {
			getlist(id) {
				this.$api.request({
					url: this.$api.getcheck,
				}).then((res) => {
					this.list = res.data
					console.log(this.list, '111111');
				})
			},
			tabAct(id) {
				uni.navigateTo({
					url: '/pages/sign/components/checkdetial?checkid=' + id
				})
			}
		},
	}
</script>

<style lang="less" scoped>
	.content {
		width: 100vw;
		height: 90vh;
		padding: 5vh 0;
		background: linear-gradient(to bottom, blue, #4B86B4);

		.list {
			width: 94%;
			height: 90vh;
			margin: 0 auto;
			overflow: scroll;
			border-radius: 30rpx;

			.card {
				margin: 30rpx 0;
				width: 100%;
				height: 40vh;
				background-color: #fff;
				border-radius: 30rpx;
				overflow: hidden;

				.pic {
					width: 100%;
					height: 25vh;

					img {
						padding: 2%;
						width: 96%;
						height: 96%;
					}
				}

				.name {
					width: 94%;
					padding: 0 3%;
					height: 8vh;
					line-height: 8vh;
					font-size: 36rpx;
				}

				.other {
					width: 100%;
					height: 7vh;
					display: flex;
					flex-direction: row;
					justify-content: space-between;

					.name {
						flex: 1;
						width: 50%;
						height: 7vh;
						line-height: 7vh;
						font-size: 30rpx;
					}

					.btn {
						width: 26%;
						height: 5vh;
						margin: 1vh auto;
						line-height: 5vh;
						text-align: center;
						background-color: ;
						border-radius: 2vh 0 0 2vh;
						background: linear-gradient(to bottom, blue, #4B86B4);
						color: #fff;
					}
				}
			}
		}

		.list::-webkit-scrollbar {
			display: none;
			/* 隐藏滚动条 */
		}
	}
</style>